package case0;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

public class JsonCase {

    public static void main(String[] args) {
        test2();
    }

    public static void test1(){
        float f = 1231231231231231232l;
        JSONObject a = new JSONObject();
        a.put("f", f);
        System.out.println(a.toString());
        JSONObject b = JSONObject.parseObject(a.toString());
        System.out.println(b.toString());
        System.out.println(b.get("f").getClass());
        //BigDecimal
    }

    public static void test2(){
        //HashMap的值不会被获取
        TestMap map = new TestMap();
        map.setKey("102324");
        map.setName("luobinjie");
        map.put("type", "yellow");
        System.out.println(map);
    }
}

@Data
class TestMap<K, V> extends HashMap<K, V> {
    String key;
    String name;
}
